<template>
	<view class="xieyi">
		<up-parse :content="content"></up-parse>
	</view>
</template>

<script setup>
	import {
		onLoad,
		onShow,
		onPageScroll,
		onReachBottom
	} from "@dcloudio/uni-app";
	import ulm, {
		$api
	} from '@/ulm';
	import {
		ref
	} from "vue"
	const content = ref({})
	onLoad((opt) => {
		init(opt['id'])
	})
	async function init(id) {
		const res = await $api.getRichtext({
			id
		})
		if (res.code == 1) {
			content.value = res.data.content
			uni.setNavigationBarTitle({
				title: res.data.title
			});
		}
	}
</script>

<style lang="scss">
	.xieyi {
		width: 100%;
		overflow: hidden;
	}
</style>